﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using NHibernate;
using CNRegex.Entity;
using CNRegex.Biz.BizAccess;
using CNRegex.Web;
using CNRegex.Biz;
using NHibernate.Context;

namespace CNRegex.Web.Base
{
	public class BaseController : Controller
	{
		private BizRegexCategory bizRegexCategory;

		public BaseController()
		{
			
		}

		private IList<RegexCategory> regexCategories;
		public IList<RegexCategory> RegexCategories
		{
			get
			{
				bizRegexCategory = BizFactory.Get<BizRegexCategory>();
				if (regexCategories != null)
					return regexCategories;
				regexCategories = bizRegexCategory.List();
				return regexCategories;
			}
		}

		protected override void OnActionExecuting(ActionExecutingContext filterContext)
		{
			base.OnActionExecuting(filterContext);
		}

		protected override void OnActionExecuted(ActionExecutedContext filterContext)
		{
			base.OnActionExecuted(filterContext);
			
		}

		protected override void OnResultExecuted(ResultExecutedContext filterContext)
		{

		}

	}
}